//tag::include[]
package org.hibernate.validator.referenceguide.chapter02.objectgraph;

//end::include[]

import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;

//tag::include[]
public class Car {

	@NotNull
	@Valid
	private Person driver;

	public Person getDriver() {
		return driver;
	}

	public void setDriver(Person driver) {
		this.driver = driver;
	}

	//...
}
//end::include[]

